package com.xfcy.blog.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xfcy.blog.common.constant.DateConstant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author 晓风残月Lx
 * @date 2023/5/20 23:42
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TagsCountVO {

    //主键id
    private Long id;
    //标签名称
    private String name;

    private Integer clickVolume;
    //排序
    private Integer sort;
    //创建时间
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = DateConstant.FORMAT_STRING, timezone = DateConstant.GMT_TIMEZONE)
    private LocalDateTime createTime;
    //最后更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = DateConstant.FORMAT_STRING, timezone = DateConstant.GMT_TIMEZONE)
    private LocalDateTime updateTime;

    private Integer articleCount;

    public TagsCountVO(Long id, int clickVolume) {
        this.id = id;
        this.clickVolume = clickVolume;
    }

}
